package ${domain.packageName};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;

import com.meibang.marketing.model.BaseEntity;
import lombok.Data;

import java.io.Serializable;

<#list tableClass.importList as fieldType>${"\n"}import ${fieldType};</#list>
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import ${updateDTO.packageName}.*;

/**
* ${tableClass.remark!}
*/
@Data
@TableName("${tableClass.tableName}")
public class ${tableClass.shortClassName}  extends BaseEntity implements Serializable {
<#list tableClass.allFields as field>

    @ApiModelProperty("${field.remark!}")<#if field.fieldName == "id">${"\n    "}@TableId(value = "id", type = IdType.AUTO)</#if><#if field.fieldName != "id">${"\n    "}@TableField(value = "${field.columnName}")</#if>
    private ${field.shortTypeName} ${field.fieldName};
</#list>

<#--    public void update(${tableClass.shortClassName}UpdateDTO updateDTO) {-->
<#--        // Step 1、设置属性值-->

<#--        // Step 2、实体完整性校验-->
<#--        this.entityCheck();-->

<#--    }-->

<#--    public ${tableClass.shortClassName} entityCheck(){-->
<#--        // 实体完整性校验-->
<#--        return this;-->
<#--    }-->
}
